home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / bscsplit / demoform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-01-10  |  8.5 KB  |  231 lines

  1. VERSION 5.00
  2. Object = "{811E4A19-89CA-11D1-BD4D-DFEBE4346D29}#2.0#0"; "BSCSPLITTER.OCX"
  3. Begin VB.Form DemoForm 
  4.    Caption         =   "BSCSplitter Control Example Application"
  5.    ClientHeight    =   4755
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   6945
  9.    Icon            =   "DemoForm.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4755
  12.    ScaleWidth      =   6945
  13.    StartUpPosition =   2  'CenterScreen
  14.    Begin BSCSplitter_Control.BSCSplitter BSCSplitter1 
  15.       Height          =   4575
  16.       Left            =   120
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   6735
  20.       _ExtentX        =   11880
  21.       _ExtentY        =   8070
  22.       Begin VB.PictureBox Picture1 
  23.          Height          =   4575
  24.          Index           =   0
  25.          Left            =   0
  26.          ScaleHeight     =   4515
  27.          ScaleWidth      =   2220
  28.          TabIndex        =   4
  29.          Tag             =   "Left"
  30.          Top             =   0
  31.          Width           =   2280
  32.          Begin VB.Frame Frame1 
  33.             Caption         =   "SplitterType"
  34.             Height          =   975
  35.             Left            =   120
  36.             TabIndex        =   10
  37.             Top             =   120
  38.             Width           =   2055
  39.             Begin VB.OptionButton Option1 
  40.                Caption         =   "Standard"
  41.                Height          =   255
  42.                Index           =   0
  43.                Left            =   120
  44.                TabIndex        =   12
  45.                Top             =   240
  46.                Width           =   1815
  47.             End
  48.             Begin VB.OptionButton Option1 
  49.                Caption         =   "Special"
  50.                Height          =   255
  51.                Index           =   1
  52.                Left            =   120
  53.                TabIndex        =   11
  54.                Top             =   600
  55.                Value           =   -1  'True
  56.                Width           =   1815
  57.             End
  58.          End
  59.          Begin VB.TextBox Text1 
  60.             Height          =   285
  61.             Left            =   360
  62.             TabIndex        =   9
  63.             Text            =   "Text1"
  64.             Top             =   2040
  65.             Width           =   1215
  66.          End
  67.          Begin VB.VScrollBar VScroll1 
  68.             Height          =   285
  69.             Left            =   1560
  70.             Max             =   20
  71.             Min             =   1
  72.             TabIndex        =   8
  73.             Top             =   2040
  74.             Value           =   1
  75.             Width           =   375
  76.          End
  77.          Begin VB.CommandButton Command1 
  78.             Caption         =   "About..."
  79.             Height          =   375
  80.             Left            =   360
  81.             TabIndex        =   7
  82.             Top             =   2520
  83.             Width           =   1575
  84.          End
  85.          Begin VB.VScrollBar VScroll2 
  86.             Height          =   285
  87.             Left            =   1560
  88.             Max             =   3000
  89.             TabIndex        =   6
  90.             Top             =   1440
  91.             Value           =   155
  92.             Width           =   375
  93.          End
  94.          Begin VB.TextBox Text2 
  95.             Height          =   285
  96.             Left            =   360
  97.             TabIndex        =   5
  98.             Text            =   "Text1"
  99.             Top             =   1440
  100.             Width           =   1215
  101.          End
  102.          Begin VB.Label Label2 
  103.             Caption         =   "Splitter Width"
  104.             Height          =   255
  105.             Left            =   360
  106.             TabIndex        =   14
  107.             Top             =   1800
  108.             Width           =   1575
  109.          End
  110.          Begin VB.Label Label3 
  111.             Caption         =   "Splitter Left"
  112.             Height          =   255
  113.             Left            =   360
  114.             TabIndex        =   13
  115.             Top             =   1200
  116.             Width           =   1575
  117.          End
  118.       End
  119.       Begin VB.PictureBox Picture1 
  120.          BackColor       =   &H8000000D&
  121.          Height          =   4575
  122.          Index           =   1
  123.          Left            =   2400
  124.          ScaleHeight     =   4515
  125.          ScaleWidth      =   4275
  126.          TabIndex        =   1
  127.          Tag             =   "Right"
  128.          Top             =   0
  129.          Width           =   4335
  130.          Begin VB.Label Label1 
  131.             AutoSize        =   -1  'True
  132.             BackStyle       =   0  'Transparent
  133.             Caption         =   "BSCSplitter - The Alternative Splitter Bar"
  134.             BeginProperty Font 
  135.                Name            =   "MS Sans Serif"
  136.                Size            =   12
  137.                Charset         =   0
  138.                Weight          =   700
  139.                Underline       =   -1  'True
  140.                Italic          =   0   'False
  141.                Strikethrough   =   0   'False
  142.             EndProperty
  143.             ForeColor       =   &H8000000E&
  144.             Height          =   780
  145.             Index           =   0
  146.             Left            =   120
  147.             TabIndex        =   3
  148.             Top             =   120
  149.             Width           =   4080
  150.             WordWrap        =   -1  'True
  151.          End
  152.          Begin VB.Label Label1 
  153.             AutoSize        =   -1  'True
  154.             BackStyle       =   0  'Transparent
  155.             Caption         =   "BSCSplitter - The Alternative Splitter Bar"
  156.             BeginProperty Font 
  157.                Name            =   "Courier New"
  158.                Size            =   9.75
  159.                Charset         =   0
  160.                Weight          =   400
  161.                Underline       =   0   'False
  162.                Italic          =   0   'False
  163.                Strikethrough   =   0   'False
  164.             EndProperty
  165.             ForeColor       =   &H8000000E&
  166.             Height          =   480
  167.             Index           =   1
  168.             Left            =   120
  169.             TabIndex        =   2
  170.             Top             =   840
  171.             Width           =   4080
  172.             WordWrap        =   -1  'True
  173.          End
  174.       End
  175.    End
  176. Attribute VB_Name = "DemoForm"
  177. Attribute VB_GlobalNameSpace = False
  178. Attribute VB_Creatable = False
  179. Attribute VB_PredeclaredId = True
  180. Attribute VB_Exposed = False
  181. Option Explicit
  182. Dim crlf As String
  183. Private Sub Command1_Click()
  184.    BSCSplitter1.About
  185. End Sub
  186. Private Sub Form_Load()
  187.     crlf = Chr$(13) + Chr$(10)
  188.     Label1(1).Caption = "Click and drag on the splitter bar between these two panes to resize the panes." & crlf & crlf
  189.     Label1(1).Caption = Label1(1).Caption + "Double Click on the splitter bar to snap shut or open." & crlf & crlf
  190.     Label1(1).Caption = Label1(1).Caption + "How do I use it?" & crlf
  191.     Label1(1).Caption = Label1(1).Caption + "----------------" & crlf
  192.     Label1(1).Caption = Label1(1).Caption + "1) Put a BSCSplitter Control on the form." & crlf
  193.     Label1(1).Caption = Label1(1).Caption + "2) Put two further control onto the BSCSplitter control." & crlf
  194.     Label1(1).Caption = Label1(1).Caption + "3) Enter the following..." & crlf
  195.     Label1(1).Caption = Label1(1).Caption + "     Private Sub Form_Resize()" & crlf
  196.     Label1(1).Caption = Label1(1).Caption + "        BSCSplitter1.Move 0, 0, ScaleWidth, ScaleHeight" & crlf
  197.     Label1(1).Caption = Label1(1).Caption + "     End Sub" & crlf
  198.     Label1(1).Caption = Label1(1).Caption + "4) Run the program!"
  199.     Text1.Text = Str$(BSCSplitter1.SplitWidth)
  200.     Text2.Text = Str$(BSCSplitter1.SplitLeft)
  201. End Sub
  202. Private Sub Form_Resize()
  203.    BSCSplitter1.Move 0, 0, ScaleWidth, ScaleHeight
  204. End Sub
  205. Private Sub Option1_Click(Index As Integer)
  206.     If Index = 1 Then
  207.         BSCSplitter1.SplitType = Special
  208.     Else
  209.         BSCSplitter1.SplitType = Standard
  210.     End If
  211. End Sub
  212. Private Sub Picture1_Resize(Index As Integer)
  213.     Label1(0).Move 100, 100, Picture1(1).Width - 200
  214.     Label1(1).Move 100, Label1(0).Top + Label1(0).Height, Label1(0).Width
  215.     Text2.Text = Str$(BSCSplitter1.SplitLeft)
  216. End Sub
  217. Private Sub Text1_Change()
  218.     BSCSplitter1.SplitWidth = Val(Text1.Text)
  219.     VScroll1.Value = BSCSplitter1.SplitWidth
  220. End Sub
  221. Private Sub VScroll1_Change()
  222.     Text1.Text = Str$(VScroll1.Value)
  223. End Sub
  224. Private Sub Text2_Change()
  225.     BSCSplitter1.SplitLeft = Val(Text2.Text)
  226.     VScroll2.Value = BSCSplitter1.SplitLeft
  227. End Sub
  228. Private Sub VScroll2_Change()
  229.     Text2.Text = Str$(VScroll2.Value)
  230. End Sub
  231.